<p-dialog [(visible)]="display" modal="modal"  [responsive]="true" [width]="width" (onHide)="closeInspectionObjectMask(false)">
  <p-header>
    关联巡检内容
  </p-header>
  <div class="ui-g">
    <div class="ui-g-12">
      <div class="file-box">
        <div class="mybutton ui-g-12 ui-md-12 ui-lg-12">
          <button pButton type="button"  label="从已有数据中添加"  (click)="showInspectionObjectItemsMask()"></button>
          <button pButton type="button"  label="删除"  (click)="deleteInspection()" [disabled]="!selectInsepections||selectInsepections.length===0"></button>
        </div>
        <div class=" ui-g-6 ui-md-6 ui-lg-6">
          区域：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <input pInputText type="text" placeholder="输入区域名称" [(ngModel)]="queryModel.condition.region"/>
        </div>
        <div class=" ui-g-6 ui-md-6 ui-lg-6">
          巡检对象：
          <input pInputText type="text" placeholder="巡检对象" [(ngModel)]="queryModel.condition.object"/>
        </div>
        <div class="mybutton ui-g-6 ui-md-6 ui-lg-6">
          巡检内容：
          <input pInputText type="text" placeholder="巡检内容" [(ngModel)]="queryModel.condition.content"/>
        </div>
        <div class="mybutton ui-g-6 ui-md-6 ui-lg-6">

          <button pButton type="button"  label="查询"  (click)="suggestInsepections()" ></button>
        </div>
        <div class="mybutton ui-g-12 my-datatable">

            <p-dataTable [value]="inspectionsObject"
                         [totalRecords]="totalRecords"  [(selection)]="selectInsepections">
              <p-column [style]="{'width':'38px'}" selectionMode="multiple"></p-column>
              <p-column  *ngFor="let col of cols" field="{{col.field}}" header="{{col.header}}"></p-column>

              <ng-template pTemplate="emptymessage">
                当前没有数据
              </ng-template>
            </p-dataTable>

            <p-paginator rows="10" [totalRecords]="totalRecords" [rowsPerPageOptions]="[10,20,30]" (onPageChange)="paginate($event)"></p-paginator>
        </div>

      </div>
    </div>
  </div>
  <p-footer>
    <button type="button" pButton icon="fa-close" label="关闭"  (click)="closeInspectionObjectMask(false)"></button>
  </p-footer>
</p-dialog>
<app-associated-inspection-object-items
  *ngIf="showInspectionItemsMask"
  (closeMask)="closeInspectionObjectItemsMask($event)"
  (addDev)="addInsepectionContent($event)">
</app-associated-inspection-object-items>

